﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<DTTB.MV2.QUANLYNHANSUTIENLUONG.Models.FormBean.NhanVienModel.PCComForm>" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<script type="text/javascript" language="javascript" src="<%= ResolveUrl("~/Content/Scripts/NhanVien/PhuCapTienCom.js") %>"></script>
<form id="PCComfrom" action="#" class="formBox">
<table class="table_inputIn">
    <input type="hidden" id="IdKeyPCCom" name="IdKeyPCCom" value="<%= Model.IdKeyPCCom %>" />
    <tr>
        <td style="width: 10%; padding-top: 30px;" nowrap="nowrap">
            Phụ cấp cơm:
        </td>
        <td style=" padding-top: 30px;">
         <%=Html.DropDownList("IdPCCom", Model.CbPCCom, "---- Chọn Phụ cấp ----", new { Style = " width:50%" })%>
          <div class="red" id="PCComMessage"></div>
        </td>
    </tr>
     <tr>
             <td></td>
                            <td colspan="3" style="margin-top: 5px;padding-top: 30px"class="btn-submit">
                                <input type="button"class="button"  id="ThemMoiPCCom" name="btnNew" value="Hủy và Reset" onclick="javascript:DoNewPCCom();" />
                                <input type="button"class="button"  id="Button2PCCom" name="btnSave" value="Lưu" onclick="javascript:DoSavePCCom();" />
                                <input type="button"class="button"  id="XoaPCCom" name="btnDelete" value="Xóa" onclick="javascript:DoDeletePCCom();" />
                                 <input type="button"class="button" id="TrangThaiSuDung" name="btnTrangThai" value="Cập nhật trạng thái sử dụng" onclick="javascript:DoCapNhatTrangThaiSuDungPCCom();" />
                                <div style="display: inline">
                                </div>
                                <input type="button"class="button"  id="btnbtBack" name="btnBack" value="Trở về" onclick="javascript:DoBack();" />
                            </td>
              </tr>
</table>
<table  class="tab tab-drag" style="width: 100%">
    <tr class="top nodrop nodrag" style="font-weight: bold">
        <td class="first">STT</td>
        <td>Phụ cấp cơm</td>
        <td >Ngày Thây đổi</td>
         <td class="last">Trạng thái sử dụng</td>
    </tr> 
     <% 
         int stt = (Model.Pagenumber - 1) * DTTB.Common.CommonVariables.PaggedItemsPerPage + 1;
         foreach (var o in Model.PCComNhanVienPagedList)
        {%>
         <tr class="item_row" onclick="javascript:highlight(this);EditPCComAjax(<%=o.Id%>);" >
        <td class="first"><%= stt%></td>
        <td><%=o.dm_TienCom.TienCom %></td>
        <td><%=o.NgayThayDoi %></td>
          <td class="last" ><%if(o.TrangThaiSuDung==null||o.TrangThaiSuDung==false)
                {%>
                <input type="radio" id="RadioCheck<%=o.Id%>" name="RadioCheck" value="<%=o.Id%>" />
        <% } else
                {%>
                 <input type="radio" name="RadioCheck" checked="checked" value="<%=o.Id%>" />
        <% } %>
        </td>
    </tr>
        <%
            stt++;
        } %>
            <tfoot>
                            <tr class="border_bottom">
                                <td class="first" style="background: #DDDDDD">
                                </td>
                                <td class="last" colspan="6" align="right" style="background: #DDDDDD; padding-right: 10px">
                                    <%
                                        PagerOptions pagerOptions = new PagerOptions();
                                        DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate CommonDelegate= new  DTTB.MV2.QUANLYNHANSUTIENLUONG.BussinessDelegate.CommonDelegate.CommonDelegate();
                                        CommonDelegate.ChangeTextPaging(pagerOptions, "idPTPCCom");
                                    %>
                                    <div>
                                        <%=Html.Pager(Model.PCComNhanVienPagedList, pagerOptions, new object())%></div>
                                    <%=Html.Hidden("Pagenumber", Model.Pagenumber)%>
                                </td>
                            </tr>
                        </tfoot>
</table>
 </form>
